package radiostation;

import java.io.File;
import javax.swing.filechooser.FileFilter;

public class XMLFileFilter extends FileFilter {
    
    @Override
    public boolean accept(File f) {
        if (f == null) {
            return false;
        }
        if (f.isDirectory()) {
            return true;
        }
        if (f.getName().toLowerCase().endsWith(".xml")) {
            return true;
        } else {
            return false;
        }
    }

    @Override
    public String getDescription() {
        return "XML files (*.xml)";
    }
    
}
